package com.appspot.redalert;

import android.test.AndroidTestCase;
import android.content.Context;
import junit.framework.Assert;
import com.appspot.redalert.DataSource;

public class DatabaseTest extends AndroidTestCase {
	private Context mContext;
	private DataSource mDataSource;
	
	@Override
	protected void setUp() {
		mContext = getContext();
		mDataSource = new DataSource(mContext);
	}
	
	public void testDropDatabase() throws Throwable {
		mDataSource.drop();
		Assert.assertFalse(mDataSource.check());
	}
	
	public void testCreateDatabase() throws Throwable {
		mDataSource.create();
		Assert.assertTrue(mDataSource.check());
	}

}
